package _base0to1;

import _object.ListNode;

/**
 * 206. 反转链表
 */
public class No206 {
    public ListNode reverseList(ListNode head) {
        ListNode pre = null, cur = head, nex;
        while (cur != null) {
            nex = cur.next;
            cur.next = pre;
            pre = cur;
            cur = nex;
        }
        return pre;
    }
}
